package com.lianxian.xindong.di.module;

import android.app.Dialog;

import com.flyco.tablayout.listener.CustomTabEntity;
import com.hxb.library.base.BaseFragment;
import com.hxb.library.di.scope.ActivityScope;

import dagger.Binds;
import dagger.Module;
import dagger.Provides;

import com.lianxian.xindong.commonres.dialog.MyHintDialog;
import com.lianxian.xindong.commonres.dialog.ProgresDialog;
import com.lianxian.xindong.mvp.contract.MainContract;
import com.lianxian.xindong.mvp.model.MainModel;

import java.util.ArrayList;


/**
 * @作者：hexingbo
 * @时间：06/30/2023
 * @描述：
 */
@Module
public abstract class MainModule {

    @Binds
    abstract MainContract.Model bindMainModel(MainModel model);

    @ActivityScope
    @Provides
    static ArrayList<CustomTabEntity> mTabEntities() {
        return new ArrayList<>();
    }

    @ActivityScope
    @Provides
    static ArrayList<BaseFragment> mFragments() {
        return new ArrayList<>();
    }

    @ActivityScope
    @Provides
    static MyHintDialog provideHintDialog(MainContract.View view) {
        return new MyHintDialog(view.getContext());
    }

    @ActivityScope
    @Provides
    static Dialog mDialog(MainContract.View view) {
        return new ProgresDialog(view.getContext());
    }

}